package com.jdrx.sw.sewage.beans.entity;

import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import java.io.Serializable;
import java.time.LocalDateTime;

@ApiModel(value = "StationWaterQualityPO", description = "水质数据（目前只保存数据大屏水质监测下拉数据）")
@Data
public class StationWaterQualityPO implements Serializable {
    private static final long serialVersionUID = -1206960462117924923L;

    @ApiModelProperty(value = "id")
    private Long id;

    @ApiModelProperty(value = "站点id")
    private Long stationId;

    @ApiModelProperty(value = "创建时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss.SSS", timezone = "GMT+8")
    private LocalDateTime createTime;

    @ApiModelProperty(value = "进出水（1-进水 2-出水）")
    private Integer inOut;

    @ApiModelProperty(value = "COD")
    private Double cod = null;

    @ApiModelProperty(value = "NH3N")
    private Double nh3n = null;

    @ApiModelProperty(value = "TN")
    private Double tn = null;

    @ApiModelProperty(value = "PH")
    private Double ph = null;

    @ApiModelProperty(value = "TP")
    private Double tp = null;

    @ApiModelProperty(value = "SS")
    private Double ss = null;

    @ApiModelProperty(value = "temperature")
    private Double temperature = null;

    @ApiModelProperty(value = "dataNode")
    private String dataNode;


    public boolean isEmptyJudge(StationWaterQualityPO po) {
        if (null != po.getCod()
                || null != po.getNh3n()
                || null != po.getTn()
                || null != po.getPh()
                || null != po.getTp()
                || null != po.getSs()
                || null != po.getTemperature()) return true;
        else return false;
    }
}